You may use
tags to select the parts of a document that should be exported,
or to exclude parts from export. This behavior is governed by two
variables: org-export-select-tags and
org-export-exclude-tags.
Org first checks if any of the select tags is present in the buffer. If yes, all trees that do not carry one of these tags will be excluded. If a selected tree is a subtree, the heading hierarchy above it will also be selected for export, but not the text below those headings.
If none of the select tags is found, the whole buffer will be selected for export.
Finally, all subtrees that are marked by any of the exclude tags will be removed from the export buffer.